content-length mismatch composer laravel


Posted by JingTeng on 2020-07-06

問題敘述

6/22 發生這個錯誤,當時在裝 nexmo 以為是預設空間不夠,後來換中國的映像解決問題,確定是 mirror 地址掛掉。之後台灣社群也有人建了台灣的映像檔。

"composer update" not working #9003

Content-Length mismatch, received 547139 bytes out of the expected 2345297
http://repo.packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date

更換鏡像檔的方法

檢查自己的鏡像檔
composer config -l

  • 台灣 mirror
    composer config -g repos.packagist composer https://packagist.tw
  • 阿里雲 mirror
    composer config repo.packagist composer https://mirrors.aliyun.com/composer/
  • 日本 mirror
    composer config repo.packagist composer https://packagist.jp

後記

兩週後同樣的方法也成功幫我解決了類似問題
反正 composer install 有問題先換 mirror

參考資料


#Laravel







Related Posts

Apex Legends Season 17 優化筆記

Apex Legends Season 17 優化筆記

覺得 JavaScript function 很有趣的我是不是很奇怪

覺得 JavaScript function 很有趣的我是不是很奇怪

如何在 Windows 打造 Python 開發環境設定基礎入門教學

如何在 Windows 打造 Python 開發環境設定基礎入門教學


Comments